package com.starbaba.core.web.struts2;

import com.starbaba.core.utils.json.JsonUtils;

@SuppressWarnings("serial")
public class ExtJsonResult<T> extends JsonResult {
	
	protected T data;
	
	public ExtJsonResult() {
	}

	public ExtJsonResult(String status) {
		this.status = status;
	}
	
	public ExtJsonResult(String status, String message) {
		this.status = status;
		this.message = message;
	}
	
	public ExtJsonResult(String status, String message, T data) {
		super(status, message);
		this.data = data;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	@Override
	public String getJsonString(){
		return JsonUtils.toJson(this);
	}
	
}
